/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

function soloLetras(campo){
    var check = true;
    var value = campo.value;

    for(var i=0;i < campo.value.length; ++i)
    {
        var new_key = value.charAt(i);
        if(((new_key < "0") || (new_key > "9")) &&
            !(new_key == ""))
            {
            check = false;
            break;
        }
    }
    if(!check)
    {
        campo.style.backgroundColor = "red";
    }
    else
    {
        campo.style.backgroundColor = "white";
    }
}

function buscar(){
    document.getElementById("accion").value ="4";
    document.formulario.submit();
}

function listar(){
    document.getElementById("accion").value ="2";
    document.formulario.submit();
}
function modificar(){
    document.getElementById("accion").value ="5";
    document.formulario.submit();
}
function Eliminar(){
    document.getElementById("accion").value ="6";
    document.formulario.submit();
}
function registrar(){
    document.getElementById("accion").value ="3";
    document.formulario.submit();
}
function regcorreo(){
    document.getElementById("accion").value ="7";
    document.formulario.submit();
}
function buscorreo(){
    document.getElementById("accion").value ="8";
    document.formulario.submit();
}
function modicorreo(){
    document.getElementById("accion").value ="9";
    document.formulario.submit();
}
function Elicorreo(){
    document.getElementById("accion").value ="10";
    document.formulario.submit();
    
}

function registrarCliente() {
    document.getElementById("accion").value ="12";
    document.formulario.submit();
}
function buscarCliente(){
    document.getElementById("accion").value ="15";
    document.formulario.submit();
}
function ModificarCliente(){
    document.getElementById("accion").value ="13";
    document.formulario.submit();
}
function EliminarCliente(){
    document.getElementById("accion").value ="14";
    document.formulario.submit();
    
}